﻿<%@ Page Language="C#" Inherits="WinnerCMS.WebFactory.Index" EnableSessionState="false" EnableViewState="false" %>
<%@ OutputCache Duration="3600" Location="Server" VaryByParam="none" %>
<!doctype html>
<html>
<head>
    <meta charset="utf-8" />
    <title><%=WebConfig.SiteName %></title>
    <%: Styles.Render("~/WinnerCMS6/Style") %>
    <link href="{StylePath}/PhotoIndex.css" rel="stylesheet" type="text/css" />
    <!--[if lt IE 9]><script src="{SysPath}/Scripts/html5shiv.js"></script><![endif]-->

    <%: Scripts.Render("~/Script/Base") %>
    <%: Scripts.Render("~/Script/SuperSlide") %> 
    <script type="text/javascript">

        $(function () {
            $("#focusBox").slide({ mainCell: ".bd ul", effect: "left", autoPlay: true });
            $("#div_NewContents").slide();
            GetVote($("#vote")); //绑定投票
        });

    </script>
</head>
<body>
    <!--#include file="Header.aspx"-->
    <div class="mainDiv" style="margin-top: 4px">
        <div class="Left">
            <section class="div_ListBox">
                <header>
                    <h2>网站公告</h2>
                </header>
                <div class="Content">
                    <ul class="normal">
                        <TW:Announces runat="server" Rows="10">
                            <ItemTemplate>
                                <li><a href='javascript:var win =window.open("Announce/Show?ID=<%# Eval("ID") %>",null,"width=502,height=200");'><%# Eval("UpdateTime","{0:yyyy-MM-dd}")%>&nbsp;［<%# Eval("Title") %>］</a></li>
                            </ItemTemplate>
                            <EmptyDataTemplate>没有公告</EmptyDataTemplate>
                        </TW:Announces>
                    </ul>
                </div>
            </section>
            <section class="div_ListBox">
                <header>
                    <h2>本周热门</h2>
                </header>
                <div class="Content">
                    <ul>
                        <TW:HotContents runat="server" Rows="10" CategoryId="10002" Type="Week">
                            <ItemTemplate>
                                <li><a href="<%# Eval("Link") %>" title="<%# Eval("ContentTitle") %>"><%# Eval("ContentTitle") %></a></li>
                            </ItemTemplate>
                        </TW:HotContents>
                    </ul>
                </div>
            </section>
            <section class="div_ListBox">
                <header>
                    <h2>本周推荐</h2>
                </header>
                <div class="Content">
                    <ul>
                        <TW:EliteContents runat="server" Rows="10" CategoryId="10002">
                            <ItemTemplate>
                                <li><a href="<%# Eval("Link") %>" title="<%# Eval("ContentTitle") %>"><%# Eval("ContentTitle") %></a></li>
                            </ItemTemplate>
                        </TW:EliteContents>
                    </ul>
                </div>
            </section>
            <section class="div_ListBox">
                <header>
                    <h2>下载月排行</h2>
                </header>
                <div class="Content">
                    <ul>
                        <TW:HotContents runat="server" Rows="10" CategoryId="10001" Type="Month">
                            <ItemTemplate>
                                <li><a href="<%# Eval("Link") %>" title="<%# Eval("ContentTitle") %>"><%# Eval("ContentTitle") %></a></li>
                            </ItemTemplate>
                            <EmptyDataTemplate>
                                <li>没有数据</li>
                            </EmptyDataTemplate>
                        </TW:HotContents>
                    </ul>
                </div>
            </section>
            <section class="div_ListBox">
                <header>
                    <h2>下载周排行</h2>
                </header>
                <div class="Content">
                    <ul>
                        <TW:HotContents runat="server" Rows="10" CategoryId="10001" Type="Week">
                            <ItemTemplate>
                                <li><a href="<%# Eval("Link") %>" title="<%# Eval("ContentTitle") %>"><%# Eval("ContentTitle") %></a></li>
                            </ItemTemplate>
                            <EmptyDataTemplate>
                                <li>没有数据</li>
                            </EmptyDataTemplate>
                        </TW:HotContents>
                    </ul>
                </div>
            </section>
            <section class="div_ListBox">
                <header>
                    <h2>投票调查</h2>
                </header>
    <div class="Content">
        <div class="normal" id="vote" data-id="1">
            <span data-bind="text: Title"></span>
                        <table style="table-layout: fixed">
                            <tbody data-bind="foreach: VoteChoices">
                            <tr>
                                <td>
                                 <input type="checkbox" name="Selected" data-bind="attr: { value: Id, id: 'VoteChoice' + Id }" /><label data-bind="    attr: { for: 'VoteChoice' + Id }, text: ChoiceTitle"></label> </td>
                            </tr>
                            </tbody>
                        </table>
            <input type="button" onclick="PostVote($(this).parent());" value="提交" />&nbsp;&nbsp;&nbsp;&nbsp;<a data-bind="    attr: {href:'/Vote/VoteResult.aspx?Id='+Id}" target="_blank">查看结果</a>
        </div>
    </div>
            </section>
        </div>
        <div class="Right">
            <div id="div_NewContents" class="slideTxtBox" style="float: left; width: 49%; margin-bottom: 10px">
                <div class="hd">
                    <ul>
                        <li>头条新闻</li>
                        <li>头条软件</li>
                    </ul>
                </div>
                <div class="bd">
                    <ul class="infoList">
                        <TW:NewContents runat="server" Rows="11" CategoryId="10002" IsHeadline="true">

                            <ItemTemplate>
                                <li><a href="<%# Eval("Link") %>" title="标题：<%# Eval("ContentTitle") %>&#13;&#10;阅读：<%# Eval("Hits") %>"><%# Eval("ContentTitle") %></a></li>
                            </ItemTemplate>
                            <EmptyDataTemplate>无数据</EmptyDataTemplate>
                        </TW:NewContents>
                    </ul>
                    <ul class="infoList">
                        <TW:NewContents runat="server" Rows="11" CategoryId="10001" IsHeadline="true">
                            <ItemTemplate>
                                <li><a href="<%# Eval("Link") %>" title="标题：<%# Eval("ContentTitle") %>&#13;&#10;下载：<%# Eval("Hits") %>"><%# Eval("ContentTitle") %></a></li>
                            </ItemTemplate>
                            <EmptyDataTemplate>无数据</EmptyDataTemplate>
                        </TW:NewContents>
                    </ul>
                </div>
            </div>
            <div style="width: 49%; height: auto; float: right;">
                <TW:Slide CategoryId="10002" Rows="5">
                    <div id="focusBox" class="focusBox">
                        <div class="hd">
                            <ul>
                                <tabtemplate>
                    <li>@PageNo@</li>
                  </tabtemplate>
                            </ul>
                        </div>
                        <div class="bd">
                            <ul>
                                <itemtemplate>
                    <li>
                      <div class="pic"><img src="@PicUrl@" alt="@ContentTitle@" /></div>
                      <div class="con"><a href="@Link@">@ContentTitle@</a></div>
                    </li>
                  </itemtemplate>
                            </ul>
                        </div>
                    </div>
                </TW:Slide>
            </div>
            <div style="width: 100%; clear: both;"></div>
            <div class="DataList-Head">
                <h1><a href="<%=StaticFilePath.CategoryUrl(10002) %>">新闻</a></h1>
                <div class="DataList">
                    <ul>
                        <TW:NewContents runat="server" Rows="12" CategoryId="10002">
                            <ItemTemplate>
                                <li><a href="<%# Eval("Link") %>" title="标题：<%# Eval("ContentTitle") %>&#13;&#10;阅读：<%# Eval("Hits") %>"><%# Eval("ContentTitle") %></a></li>
                            </ItemTemplate>
                        </TW:NewContents>
                    </ul>
                </div>
            </div>
            <div class="DataList-Head" style="float: right; margin-left: 4px;">
                <h1><a href="<%=StaticFilePath.CategoryUrl(10001) %>">软件</a></h1>
                <div class="DataList">
                    <ul>
                        <TW:NewContents runat="server" Rows="12" CategoryId="10001">
                            <ItemTemplate>
                                <li><a href="<%# Eval("Link") %>" title="标题：<%# Eval("ContentTitle") %>&#13;&#10;阅读：<%# Eval("Hits") %>"><%# Eval("ContentTitle") %></a></li>
                            </ItemTemplate>
                        </TW:NewContents>
                    </ul>
                </div>
            </div>
            <div class="DataList-Head">
                <h1><a href="<%=StaticFilePath.CategoryUrl(10003) %>">图片</a></h1>
                <div class="DataList">
                    <ul class="col">
                        <TW:NewContents Rows="4" runat="server" CategoryId="10003">
                            <ItemTemplate>
                                <li><a title="<%# Eval("ContentTitle") %>" href="<%# Eval("Link") %>">
                                    <img src="<%# Eval("PicUrl") %>"></a>
                                    <br />
                                    <a target="_blank" href="<%# Eval("Link") %>" class="ContetnBreak title" title="<%# Eval("ContentTitle") %>"><%# Eval("ContentTitle") %></a></li>
                            </ItemTemplate>
                        </TW:NewContents>
                    </ul>
                </div>
            </div>
            <div class="DataList-Head" style="float: right; margin-left: 4px;">
                <h1><a href="<%=StaticFilePath.CategoryUrl(10004) %>">商城</a></h1>
                <div class="DataList">
                    <ul>
                        <TW:NewContents runat="server" Rows="12" CategoryId="10004">
                            <ItemTemplate>
                                <li><a href="<%# Eval("Link") %>" title="标题：<%# Eval("ContentTitle") %>&#13;&#10;阅读：<%# Eval("Hits") %>"><%# Eval("ContentTitle") %></a></li>
                            </ItemTemplate>
                        </TW:NewContents>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div style="width: 986px; margin-left: auto; margin-right: auto; clear: both;">
        <div style="width: 926px; height: 20px; float: left">
            <img src="{SysPath}/Images/FriendLink.gif" alt="" width="100%" height="20" /></div>
        <div style="width: 60px; height: 20px; float: left"><a href="ApplyFriend.aspx" target="_blank">申请链接</a></div>
        <div>
            <TW:FriendLink Type="Logo">
                <itemtemplate> <a href="@URL@" target="_blank"><img src="@Logo@" width="88" height="33" alt="@Title@" /></a> </itemtemplate>
                <emptydatatemplate>没有Logo链接</emptydatatemplate>
            </TW:FriendLink>
        </div>

        <TW:FriendLink Type="Text">
            <div>
                <itemtemplate> <a href="@URL@" target="_blank">@Title@</a> </itemtemplate>
                <emptydatatemplate></emptydatatemplate>
            </div>
        </TW:FriendLink>

    </div>
    <!--#include file="Footer.aspx"-->

</body>
</html>
